<?php foreach ($aryCategory as $key => $category) {
    if($category['category_id'] == $category_id){
        $this->headTitle($category['category_name']);
        break;
    }
}?>
<?php
if (isset($member_email)) {
    echo $this->partial('header/wellcome.phtml', array('member_email' => $member_email));
}
?>
<div class="row row-offcanvas row-offcanvas-right">
    <div class="col-xs-12 col-sm-9">
        <div class="row">
            <ul class="nav nav-pills">
                <li>
                    <a>
                        <?php foreach ($aryCategory as $key => $category) { ?>
                            <?php if ($category['category_id'] == $category_id) { ?>
                                <?php echo $category['category_name']; ?>
                            <?php } ?>
                        <?php } ?>
                    </a>
                </li>
                <li><a style="<?php echo ($order == 'ASC') ? 'background-color:#eee' : '';?>" href="<?php echo $this->url('product/product-by-category', array(
                    'cat_id' => $category_id,
                    'cat_name' => $category_filter,
                    'maker_name' => $maker_name,
                    'price_step' => $price_step,
                    'order_by' => 'up',
                    'page' => $current_page
                ));?>">Price up</a></li>
                <li><a style="<?php echo ($order == 'DESC') ? 'background-color:#eee' : '';?>" href="<?php echo $this->url('product/product-by-category', array(
                    'cat_id' => $category_id,
                    'cat_name' => $category_filter,
                    'order_by' => 'down',
                    'maker_name' => $maker_name,
                    'price_step' => $price_step,
                    'page' => $current_page
                ));?>">Price down</a></li>
            </ul>
            <?php foreach ($aryProduct as $key => $product) { ?>
                <div class="col-sm-6 col-md-4">
                    <div class="thumbnail">
                        <a href="<?php echo $this->url('product/product-detail', array('product_id' => $product['product_id'], 'product_name' => $product['product_name_filter'].'.html'));?>">
                            <img alt="<?php echo $product['product_name']; ?>" style="height: 200px; width: 100%; display: block;" src="/upload/images/thumb/<?php echo $product['product_image']; ?>">
                        </a>
                        <div class="caption">
                            <h5><a href="<?php echo $this->url('product/product-detail', array('product_id' => $product['product_id'], 'product_name' => $product['product_name_filter'].'.html'));?>"><?php echo $product['product_name']; ?></a></h5>
                            <?php if ($product['product_price_sale_of']) { ?>
                                <p>
                                    <span style="text-decoration: line-through;padding-right: 10px;"><?php echo number_format($product['product_price'], 0, ',', '.') ?>&nbsp;vnđ</span>
                                    <span><?php echo number_format($product['product_price_sale_of'], 0, ',', '.') ?>&nbsp;vnđ</span>
                                </p>
                            <?php } else { ?>
                                <p><?php echo number_format($product['product_price'], 0, ',', '.') ?>&nbsp;vnđ</p>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            <?php } ?>
        </div>
        <?php
        echo $this->paginationControl($this->aryProduct, 'Sliding', 'product/product-paginator.phtml', array(
            'route' => 'product/product-by-category',
            'cat_id' => $category_id,
            'cat_name' => $category_filter,
            'order' => $order_by,
            'maker_name' => $maker_name,
            'price_step' => $price_step
        ));
        ?>
    </div>

    <div role="navigation" id="" class="col-xs-6 col-sm-3 sidebar-offcanvas">
        <?php include 'category.phtml'; ?>
    </div>
    <div role="navigation" id="" class="col-xs-6 col-sm-3 sidebar-offcanvas">
        <?php include 'maker.phtml'; ?>
    </div>
    <div role="navigation" id="" class="col-xs-6 col-sm-3 sidebar-offcanvas">
        <?php include 'price-step.phtml'; ?>
    </div>
</div>